<?php


$config = array(
    'adduser_rules'    => array(
        array(
            'field'    => 'firstname',
            'label'    => 'Firstname',
            'rules'    => 'trim|required|min_length[3]|alpha|xss_clean'
        ),
        array(
            'field'    => 'surname',
            'label'    => 'Surname',
            'rules'    => 'trim|required|min_length[3]|alpha|xss_clean|callback__valid_fullname[firstname]'
        ),
        array(
            'field'    => 'password',
            'label'    => 'Password',
            'rules'    => 'trim|required|min_length[5]|matches[passconf]|md5'
        ),
        array(
            'field'    => 'passconf',
            'label'    => 'Password confirmation',
            'rules'    => 'trim|required'
        ),
        array(
            'field'    => 'user_level',
            'label'    => 'User level',
            'rules'    => 'trim|required|callback__valid_user_level'
        )
    ),
    'process_rules'    => array(
        array(
            'field'    => 'name',
            'label'    => 'Name',
            'rules'    => 'trim|required|min_length[4]|alpha_dash|xss_clean'
        ),
        array(
            'field'    => 'description',
            'label'    => 'Description',
            'rules'    => 'trim|required|min_length[10]|xss_clean'
        ),
        array(
            'field'    => 'administrator',
            'label'    => 'Process administrator',
            'rules'    => 'required|callback__valid_admin'
        )
    ),
    'stage_rules'      => array(
        array(
            'field'    => 'name',
            'label'    => 'Name',
            'rules'    => 'trim|required|min_length[4]|alpha_dash|xss_clean'
        ),
        array(
            'field'    => 'description',
            'label'    => 'Description',
            'rules'    => 'trim|required|min_length[10]|xss_clean'
        ),
        array(
            'field'    => 'jointype',
            'label'    => 'Join type',
            'rules'    => 'required|callback__valid_jointype'
        ),
        array(
            'field'    => 'splittype',
            'label'    => 'Split type',
            'rules'    => 'required|callback__valid_splittype'
        ),
        array(
            'field'    => 'administrator',
            'label'    => 'Process administrator',
            'rules'    => 'required|callback__valid_admin'
        )
    ),
    'contribution_rules' => array(
        array(
            'field'    => 'name',
            'label'    => 'Contribution name',
            'rules'    => 'trim|required|min_length[4]|alpha_dash|xss_clean'
        ),
        array(
            'field'    => 'description',
            'label'    => 'Description',
            'rules'    => 'trim|required|min_length[10]|xss_clean'
        )
    ),
    'attribute_rules' => array(
        array(
            'field'    => 'name',
            'label'    => 'Attribute name',
            'rules'    => 'trim|required|min_length[4]|alpha_dash|xss_clean'
        ),
        array(
            'field'    => 'description',
            'label'    => 'Description',
            'rules'    => 'trim|required|min_length[10]|xss_clean'
        ),
        array(
            'field'    => 'attribute_type',
            'label'    => 'Attribute type',
            'rules'    => 'trim|required|callback__valid_attribute_type'
        ),
        array(
            'field'    => 'optional',
            'label'    => 'Optional',
            'rules'    => '',
        )
    )
);

?>
